package com.yuetong.employee.service.impl;

import java.util.List;
import com.yuetong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yuetong.employee.mapper.YtEmployeeDocumentsMapper;
import com.yuetong.employee.domain.YtEmployeeDocuments;
import com.yuetong.employee.service.IYtEmployeeDocumentsService;

/**
 * 证件照信息Service业务层处理
 * 
 * @author  卓晓君
 * @date 2025-04-24
 */
@Service
public class YtEmployeeDocumentsServiceImpl implements IYtEmployeeDocumentsService 
{
    @Autowired
    private YtEmployeeDocumentsMapper ytEmployeeDocumentsMapper;

    /**
     * 查询证件照信息
     * 
     * @param documentId 证件照信息主键
     * @return 证件照信息
     */
    @Override
    public YtEmployeeDocuments selectYtEmployeeDocumentsByDocumentId(Long documentId)
    {
        return ytEmployeeDocumentsMapper.selectYtEmployeeDocumentsByDocumentId(documentId);
    }

    /**
     * 查询证件照信息列表
     * 
     * @param ytEmployeeDocuments 证件照信息
     * @return 证件照信息
     */
    @Override
    public List<YtEmployeeDocuments> selectYtEmployeeDocumentsList(YtEmployeeDocuments ytEmployeeDocuments)
    {
        return ytEmployeeDocumentsMapper.selectYtEmployeeDocumentsList(ytEmployeeDocuments);
    }

    /**
     * 新增证件照信息
     * 
     * @param ytEmployeeDocuments 证件照信息
     * @return 结果
     */
    @Override
    public int insertYtEmployeeDocuments(YtEmployeeDocuments ytEmployeeDocuments)
    {
        ytEmployeeDocuments.setCreateTime(DateUtils.getNowDate());
        return ytEmployeeDocumentsMapper.insertYtEmployeeDocuments(ytEmployeeDocuments);
    }

    /**
     * 修改证件照信息
     * 
     * @param ytEmployeeDocuments 证件照信息
     * @return 结果
     */
    @Override
    public int updateYtEmployeeDocuments(YtEmployeeDocuments ytEmployeeDocuments)
    {
        ytEmployeeDocuments.setUpdateTime(DateUtils.getNowDate());
        return ytEmployeeDocumentsMapper.updateYtEmployeeDocuments(ytEmployeeDocuments);
    }

    /**
     * 批量删除证件照信息
     * 
     * @param documentIds 需要删除的证件照信息主键
     * @return 结果
     */
    @Override
    public int deleteYtEmployeeDocumentsByDocumentIds(Long[] documentIds)
    {
        return ytEmployeeDocumentsMapper.deleteYtEmployeeDocumentsByDocumentIds(documentIds);
    }

    /**
     * 删除证件照信息信息
     * 
     * @param documentId 证件照信息主键
     * @return 结果
     */
    @Override
    public int deleteYtEmployeeDocumentsByDocumentId(Long documentId)
    {
        return ytEmployeeDocumentsMapper.deleteYtEmployeeDocumentsByDocumentId(documentId);
    }
}
